﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Design;

using UsernameAssertionLibrary;

namespace Incubator
{
    public partial class IncubatorMaster : System.Web.UI.MasterPage
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            Global.incuServ = new Incubator.webRef.IncubatorService();


            if (Session["user"] != null && Session["pass"] != null)
            {
                UsernameClientAssertion assert = new UsernameClientAssertion(Session["username"].ToString(), Session["pass"].ToString());

                // create policy
                Policy policy = new Policy();
                policy.Assertions.Add(assert);
                Global.incuServ.SetPolicy(policy);

            }   
        }
        protected void Page_Load(object sender, EventArgs e)
        {

           
            
        }

        protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
        {

        }
    }
}
